<template >
    <div>
        <van-nav-bar
        title="祥情页面"
      
        left-arrow
        @click-left="$router.go(-1)"
       
      />
        <img :src="gods.pic" alt="">
        <p>{{gods.title}}</p>
        <p class="price">￥{{gods.price}}</p>
       
        <van-popup
        v-model="isShow"
        position="bottom"
        closeable
        close-icon-position="top-left"
        round
      >
      <div style="padding-top:20px">
          <van-image :src="goods.pic"/>
          <p style="font-size:15px;">{{goods.title}}</p>
          <van-button type="primary" size="small" block @click="add">确定</van-button>
      </div>
      </van-popup>
    </div> 
</template>
<script>
    import axios from 'axios'
export default {
    data(){
        return {
            gods:{},
        }
    },
    mounted(){
        let index = this.$route.query.id;
        console.log(index);
            axios.get('/list1.json').then(res=>{
                console.log(res);
                this.gods = res.data.result[index]
            })
    }
}
</script>
<style lang="scss">
        p{
            font-size: 18px;
        }
        .price{
            color: red;
        }
</style>